#define DEBUG
#include <cstdio>
#define MODS 1000000007
#define MAXN 1000
#define MAXM (MAXN*(MAXN-1)/2)

using namespace std;

long long solve(int o, int n, bool graph[MAXN+1][MAXN+1]) {
  static bool book[MAXN+1];
  long long ret=0;
  if (o<=n) {
    bool flag=true;
    book[o] = true;
    for (int i=1; i<o && flag; i++) {
      if (book[i] && graph[i][o]) {
	flag = false;
      }
    }
    if (flag) {
      ret = (ret+solve(o+1, n, graph))%MODS;
    }
    flag=true;
    book[o] = false;
    ret = (ret+solve(o+1, n, graph))%MODS;
  } else {
    ret=1;
    for (int i=1; i<=n && ret; i++) {
      if (!book[i]) {
	bool flag=false;
	for (int j=1; j<=n && !flag; j++) {
	  if (book[j] && graph[i][j]) {
	    flag = true;
	  }
	}
	ret = ret&&flag;
      }
    }
  }
  return ret;
}

int main() {
#ifdef DEBUG
  freopen("2.in", "r", stdin);
  freopen("2.out", "w", stdout);
#endif

  static bool graph[MAXN+1][MAXN+1];
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i=1; i<=m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    graph[x][y] = graph[y][x] = true;
  }

  printf("%lld", solve(1, n, graph));

  fcloseall();
  return 0;
}
